package com.shishuo.cms.service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;

import com.shishuo.cms.dao.GoodsClassifyDao;
import com.shishuo.cms.entity.GoodsClassify;

@Service
public class GoodsClassifyService {
	@Autowired
	private GoodsClassifyDao goodsClassifyDao;

	@CacheEvict(value = "goodsClassify", allEntries = true)
	public GoodsClassify addGoodsClassify(GoodsClassify goodsClassify) throws Exception {
		goodsClassify.setCategoryCreateDate(new Date());
		goodsClassifyDao.addGoodsClassify(goodsClassify);
		return goodsClassify;
	}

}
